//wontube blog
$(function(){
	preview.run();
});

var preview = {
		run: function(){
			this._init_();
			this._start_();
			this._init_events();			
		},
		
		_init_: function(){			
			this.contextPath = $("#contextPath").val();
			this.blogId = $("#blogId").val();
		},
		
		_start_: function(){						
		},
		
		_init_events: function(){
			$("#release_blog_a").click(function(){
				var c = confirm("确定要发布吗?");
				if(c){
					var url = preview.contextPath + "/admin/blog/release/" + preview.blogId;
					$.post(url, function(result){
						alert(result);
					});
				}
			});
			$(".blog-lyric li:odd").addClass("lyric-bg");
		}
};